#pragma once

#define SIZE_OF_HASH 16 // The MD5 algorithm always returns 16 bytes. 

enum PRIVRESPONSE{
	SUCCESS_PRIV,
	FAIL_ENC_DIR,
	FAIL_TEMP_FILE_NAME,
	FAIL_OPEN_SRC_FILE,
	FAIL_OPEN_DEST_FILE,
	FAIL_HASH_FAIL,
	FAIL_READ_PASS_ERROR
};

class FilePrivacy
{
private:
	static void Digest(unsigned char* source, size_t sourceSize, unsigned char** dest);

public:
	static bool CheckPassword(LPCWSTR filePath, const wchar_t* passwd);
	static PRIVRESPONSE RC4EncryptFile(HWND parent, LPCWSTR filePath, const wchar_t* passwd);
	static PRIVRESPONSE RC4DecryptFile(HWND parent, LPCWSTR filePath, const wchar_t* passwd);
};
